package giab.weixin.web.httpimpl;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

import giab.weixin.web.httpservice.WeixinHttpBaseService;
import giab.weixin.web.util.MD5Util;

import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class WeiXinHttpImpl {
	@Autowired
	private WeixinHttpBaseService whbs;
	
	
	
	
	public void loginWeiXin(){
		
		HashMap<String, String> map = new HashMap<String, String>();
		map.put("username", "1020569476");
		map.put("pwd", MD5Util.getMD5("Ymm@871121"));
		map.put("f", "json");
		Map<String, String> coockie = new WeixinHttpBaseService().postUrlResultCookies( map);
		if(coockie!=null){
			System.out.println(coockie);
		}
		
	}
	
	public static void main(String args[]){
		String dreString =new WeiXinHttpImpl().convert(360);
		System.out.println(dreString);
		
		
	}
	
	public static String convert(int second){
	     int h=0,d=0,s=0;
	     s=second%60;
	     second=second/60;
	     d=second%60;
	     h=second/60;
	     return h+"时"+d+"分"+s+"秒";
	     }
	

}
